WEBVTT

00:00.510 --> 00:01.560
Hi and welcome back.

00:01.590 --> 00:08.430
So first we want to rename our Jupiter notebook from untitled to let's say.

00:08.620 --> 00:09.380
Thanks.

00:09.420 --> 00:13.440
So we are here on the Python basic section.

00:13.440 --> 00:16.920
And before we start coding we want to structure our notebook a little bit.

00:16.920 --> 00:22.610
So this is the good thing off to be the notebooks that we can combine code and text.

00:22.800 --> 00:29.380
And first of all we want to create a heading and therefore we have to change the setting of our set.

00:29.400 --> 00:35.490
So here we can see it's in the code setting and we want to create a heading which is a text actually

00:35.490 --> 00:38.710
and therefore we need in the markdown setting.

00:39.280 --> 00:47.160
And here we are already in the command mode and if you press and the M clear we can switch to markdown

00:47.330 --> 00:53.840
and alternatively we can also switch to markdown by just here going to the drop down menu and select

00:53.930 --> 00:56.680
markdown.

00:56.680 --> 00:57.040
All right.

00:57.040 --> 01:00.150
So now we can go into the cell and we want to create a headings.

01:00.160 --> 01:05.950
So we need to press the hash key and then make a space in there.

01:05.980 --> 01:12.930
Consider the font size already increases and then we can write our headings so let's call our heading

01:12.930 --> 01:21.140
Python basics and then we can run the set by pressing shift enter.

01:21.350 --> 01:28.730
So now here we have our heading and we are automatically in the next center and we want to make a subheading

01:29.840 --> 01:36.970
and first of all here we have to select the markdown mode and all we want to create a soft pedal.

01:36.970 --> 01:44.280
So we take two hash keys and an empty space and let's say we want to enumerate our session.

01:44.290 --> 01:47.760
So this is the first session about the first steps

01:54.600 --> 02:01.710
so we can see with two hash keys our font size is a little bit smaller than um our header here was the

02:01.740 --> 02:02.780
one hash key.

02:03.630 --> 02:05.670
So let's run here.

02:05.840 --> 02:11.790
So now before we want to create our first code we want to explain what we will do in this session here.

02:11.900 --> 02:26.480
That's against select markdown and then let's explain in this session you have to learn the basics of

02:28.040 --> 02:28.790
Python

02:33.660 --> 02:34.120
All right.

02:34.120 --> 02:39.280
So now we are finished with all our headings in our description and now we want to stop coding and before

02:39.280 --> 02:47.400
we are again going to the command mode here and pressing the B key a few times so we add some lines

02:47.400 --> 02:55.260
here and then we are going here to our first line and what we can do we are we can say okay we have

02:55.260 --> 02:58.010
a five here and we can just print out the five.

02:58.020 --> 03:04.880
So the input is five and the output of our code is five so five is simply five.

03:04.960 --> 03:13.020
As you can see here yeah actually we can use python as a calculator to perform basic mathematical operations.

03:13.020 --> 03:23.060
So for example we can make an addition of five plus one gets six and we can solve strict.

03:23.060 --> 03:26.360
So for example five minus one gets us for

03:31.630 --> 03:42.180
and of course we can also multiply five times to gets 10 and we can also make an exponential so we can

03:42.180 --> 03:54.310
say five to the power of two gives twenty five and we can also divide so we can say five slashes um

03:54.380 --> 03:56.140
divided by two.

03:57.320 --> 04:03.990
And discuss 2.5 and Ann Pace and s and the fangs and type

04:06.530 --> 04:13.860
and in the brackets you can pass an object like here our number four or 2.5.

04:13.880 --> 04:16.400
And the function type checks.

04:16.520 --> 04:20.750
Then what data type the object that was passed in the brackets.

04:20.810 --> 04:21.190
Um yeah.

04:21.200 --> 04:21.850
Yes actually.

04:21.880 --> 04:25.340
So let's try to find out what five.

04:25.460 --> 04:26.650
Which data type it is.

04:27.410 --> 04:34.340
And it's in that uh so an integer is just a number without any decimals.

04:34.340 --> 04:39.680
And we can also check the data type of 2.5

04:42.140 --> 04:44.350
and 2.5 as a float object.

04:44.380 --> 04:52.090
So a float object tests in some decimals after the point here so the type function as the other first

04:52.090 --> 04:54.180
example of a function in Python.

04:54.550 --> 05:01.030
So you can parse an object like 5 or 2.5 within the brackets of the function and then the function does

05:01.240 --> 05:09.470
something with the object and in this case it determines and the data type of object.

05:09.490 --> 05:11.890
Now you could ask what is in objects on Python.

05:11.920 --> 05:16.540
Everything is an object cost Python is an object oriented programming language.

05:16.540 --> 05:21.220
However at this point I do not want to go into details of object oriented programming.

05:21.250 --> 05:25.710
So what is important for you is actually that the each element we are working with.

05:25.710 --> 05:32.810
So for example here the 5 for 2.5 is an object and python and objects can be of different data types.

05:32.810 --> 05:40.240
So Fyfe isn't in the john 2.5 is a float object and different data types have different functionalities

05:40.270 --> 05:45.700
but we will learn more about it and the next session's about into just float strings and so on.

05:46.120 --> 05:53.860
So what we can do now we can type something here in quotation mark let's say Doc and it returns our

05:53.860 --> 05:56.590
stock.

05:56.650 --> 06:05.830
So now again let's add some lines service that's the key key and if you check the type of dog it gives

06:05.830 --> 06:12.880
us the string so dog is a string object and string object is actually a sequence of characters which

06:12.880 --> 06:16.160
was created within quotation marks.

06:16.210 --> 06:23.070
So my name is Alex and I can just write here my name in quotation mark and uh this is a string also.

06:23.350 --> 06:24.570
However what does not work.

06:24.580 --> 06:28.050
We cannot just write dark here.

06:28.240 --> 06:36.080
So this drops us an error message and says and the name Dog is not defined so when we write dark here

06:36.080 --> 06:37.400
without quotation marks.

06:37.400 --> 06:44.450
Python assumes that Doc is viable which was defined earlier but yeah it does not find any information

06:44.450 --> 06:46.160
on the variable dog.

06:46.160 --> 06:49.430
So and then it drops them an error message.

06:49.430 --> 06:53.330
And of course the will learn later was Latin revivalists in detail.

06:53.540 --> 07:00.230
But now let's go on with one more thing we want to learn so let's assume here in a set of we want to

07:00.230 --> 07:06.640
make two calculations so let's say five plus two and then four minus one.

07:06.650 --> 07:12.440
And then if you run the third we only get the result of the last statement and our side so far minus

07:12.440 --> 07:19.070
one gives us three but this does not mean that and do not say I calculate also five plus two and actually

07:19.070 --> 07:21.380
pace and thus calculate five plus two.

07:21.380 --> 07:28.120
But we do not see it here in the output and if you want to print a many statements we have to use and

07:28.130 --> 07:31.520
the function print so print is also a function

07:34.280 --> 07:40.310
and within the brackets we can pass an statement which we want to see in the output.

07:40.310 --> 07:51.340
So for example five plus two and again we can take four minus one and if we run the set now we get to

07:51.370 --> 07:57.700
the output of both statements so five plus to give seven and four minus one gives us three and we can

07:57.700 --> 08:06.520
also pass both calculations within the brain function so we can say print five plus two comma and Four

08:06.520 --> 08:17.130
minus one guess seven and three but this is also an advantage of Jupiter notebook if we only want to

08:17.130 --> 08:18.810
print let's say five.

08:18.840 --> 08:23.480
We can just type five and around the set and this gives us five.

08:23.490 --> 08:32.580
So we do not have to explicitly say here please print me five so encoding environments other than to

08:32.580 --> 08:38.390
put a notebook we always have to use in the print function but the two bits are not book notes here

08:38.390 --> 08:41.430
in this example okay I should print five.

08:41.450 --> 08:47.300
So we do not have to explicitly write print here and took it a notebook but it gives the actually the

08:47.300 --> 08:48.980
same result.

08:49.000 --> 08:55.110
All right so this some of the basics of Python and then the next session we will have a look at a variable.

08:55.120 --> 08:56.950
So I hope to see you there by.
